import { Controller, Get, Inject } from '@midwayjs/core';
import { Context } from '@midwayjs/koa';

@Controller('/')
export class BaseController {
  @Inject()
  ctx: Context;

  @Get('/')
  async home() {
    return {
      code: 200,
      message: 'Welcome to Cool Admin'
    };
  }

  @Get('/404')
  async notFound() {
    return {
      code: 404,
      message: 'Page Not Found'
    };
  }
}